package de.tud.binpacking.heuristic.construction;

import de.tud.binpacking.data.Batch;
import de.tud.binpacking.data.Order;
import de.tud.binpacking.instance.Instance;

public class ForEachOrderOneBatch extends AStartHeuristic {

	public ForEachOrderOneBatch(Instance instance) {
		super(instance);
	}

	@Override
	public String toString() {
		return "For Each Order One Batch";
	}

	@Override
	protected boolean findSolution() {
		Batch batch;
		for(Order order : instance.getOrders()) {
			batch = new Batch(instance);
			batch.add(order);
			solution.addBatch(batch);
		}
		return true;
	}

}
